<?=$userselection?>

<?include('matches-matchgroup.php');?>



<?php if ($isStarted): ?>

<h3 class="center"><?=$match->team_h?> - <?=$match->team_a?> <?=$match->goals_h?>:<?=$match->goals_a?></h3>

<p class="center"><img src="<?=site_url('/statistics/chart/'.$graph)?>" /></p>

<table id="matches" border="0" cellpadding="2" cellspacing="2"><tbody>
<tr>
	<th><?=lang('username')?></th>
	<th><?=lang('prediction');?></th>
	<th><?=lang('points');?></th>
</tr>

<?php $summe=0; $i=0; foreach($predictions as $p): ?>

<?php if ($i++ % 2 == 0) $class="odd"; else  $class="even"; ?>
<tr class="<?=$class?>">

	<td><?=$p->name?></td>
	<td class="right"><?=$p->g_goals_h?> : <?=$p->g_goals_a?></td>
	<td><? $summe += getPoints($match->goals_h, $match->goals_a, $p->g_goals_h, $p->g_goals_a)?></td>
</tr>
<?php endforeach; ?>

<tr class="pointssum">
	<td colspan="2"></td>
	<td class="right"><strong>&Sigma; = <?=$summe?></strong></td>
</tr>

</tbody></table>



<?php else: ?>
	<h3 class="center"><?=$match->team_h?> - <?=$match->team_a?></h3>
	<p class="center"><?=lang('match_not_started');?></p>
<?php endif; ?>
